page insert
指定行の直後に行を挿入します。
書式
cos page insert <title> --after <n> (--line <text> | --from-file <path>) --project <name>
フラグ
--after <n> — 挿入位置 (1-indexed、この行の直後に挿入)、必須
--line <text> — 挿入する行テキスト (\n 区切りで複数行)
--from-file <path> — ファイルから読み込む (- で stdin)
--dry-run — 実行せずプレビューを表示
使用例
code:bash
# 3行目の直後に挿入 (タイトル行 = 1)
cos page insert "既存ページ" --after 3 --line "挿入テキスト" --project myproject
# 複数行挿入
cos page insert "既存ページ" --after 5 --line "新行1\n新行2" --project myproject
# dry-run で確認
cos page insert "既存ページ" --after 3 --line "テスト" --project myproject --dry-run
関連ページ